package com.mall.user.domain.model;

public record AreaId2(Long id) {
    public AreaId2 {
        //二级地区编号最小值为0
        if (id < 0) {
            throw new IllegalArgumentException("二级地区编号最小值为1");
        }
    }

    public static AreaId2 of(Long id) {
        return new AreaId2(id);
    }
}
